-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow embed timestamp to be Date in typings #587
Conversation
Type should by `string | Date` in order to allow for doing `timestamp: new Date()`
`timestamp`s do not work with `string`s at all, the data type must be `Date`
I think this PR is fine, but fair warning this could be considered a breaking change. Since it was accepting
Im pretty sure this would break on compile time because you cant set a string to a |
Stop devs gettings loads of errors if they have already been passing strings not dates
1ad6f0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's perfect. Slight modification to Date | string
to have a Strict => Loose typings format would be nicer on the eyes imo.
I have always used |
Co-Authored-By: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
Type should be
string | Date
in order to allow for doingtimestamp: new Date()